Weak updates and separation logic (Technical Report)

نویسندگان

  • Gang Tan
  • Zhong Shao
  • Xinyu Feng
  • Hongxu Cai
چکیده

Separation Logic (SL) provides a simple but powerful technique for reasoning about imperative programs that use shared data structures. Unfortunately, SL supports only “strong updates”, in which mutation to a heap location is safe only if a unique reference is owned. This limits the applicability of SL when reasoning about the interaction between many high-level languages (e.g., ML, Java, C#) and low-level ones since these high-level languages do not support strong updates. Instead, they adopt the discipline of “weak updates”, in which there is a global “heap type” to enforce the invariant of type-preserving heap updates. We present SLw, a logic that extends SL with reference types and elegantly reasons about the interaction between strong and weak updates. We also describe a semantic framework for reference types; this framework is used to prove the soundness of SLw.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Concurrent Separation Logic with Weak Updates

Concurrent Separation Logic (CSL) provides a simple but powerful technique for reasoning about shared-memory concurrent programs. Unfortunately, CSL and separation logic can only support “strong updates,” where mutation to a memory location is safe only if there is a strong memory separation. This severely limits the applicability of CSL since most statically typed languages (e.g., ML, Java, C#...

متن کامل

SL2 Expressive Completeness of Separation Logic With Two Variables and No Separating Conjunction

Separation logic is used as an assertion language for Hoare-style proof systems about programs with pointers, and there is an ongoing quest for understanding its complexity and expressive power. Herein, we show that first-order separation logic with one record field restricted to two variables and the separating implication (no separating conjunction) is as expressive as weak second-order logic...

متن کامل

Lightweight Separation

Lightweight separation is a novel approach to automatic reasoning about memory updates in pointer programs. It replaces the spatial formulae of separation logic, which complicate automation, by independent assertions about the memory content and the memory layout. As a result, assertions about the content can be treated by existing reasoners. The effect of memory updates is evaluated using spec...

متن کامل

A Context Logic for Tree Update

Spatial logics have been used to describe properties of tree-like structures (Ambient Logic) and in a Hoare style to reason about dynamic updates of heap-like structures (Separation Logic). We integrate this work by analyzing dynamic updates to tree structures with pointers (such as XML with identifiers and idrefs). Naı̈ve adaptations of the previous logics are not expressive enough to capture s...

متن کامل

Update Operation in ASP Revisited

Revising and updating knowledge bases is an important topic in knowledge representation and reasoning. Various proposals have been made to update logic programs, in particular with respect to Answer Set Programming. Most of these approaches are based on a causal rejection principle, which leads to counterintuitive behaviour. In order to overcome such behaviour, this report presents a collection...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2009